import React, { Component } from 'react';
import styled from 'styled-components/native';
import { ActivityIndicator } from 'react-native';

import { colors } from '../utils/constants';

const Root = styled.View`
  flex: 1;
  align-items: center;
  justify-content: center;
`;

class Loading extends Component {
  render() {
    const { color = colors.PRIMARY, size = 'large' } = this.props;

    return (
      <Root>
        <ActivityIndicator size={size} color={color} />
      </Root>
    );
  }
}

export default Loading;
